<?php

namespace LowCode\UI;

use LowCode\Naive\Button;
use LowCode\Support\JsExp;

/**
 * 按钮组件 ButtonIcon
 * @method static static make(mixed $children = null) ButtonIcon 按钮组件
 */
class ButtonIcon extends Button
{
    /**
     * @param mixed|null $children
     */
    public function __construct(mixed $children = null)
    {
        parent::__construct($children);
        $this->componentName("ButtonIcon");
    }

    /**
     * @param string|JsExp $icon
     * @return ButtonIcon
     */
    public function icon(string|JsExp $icon): static
    {
        return $this->prop("icon", $icon);
    }

    /**
     * @param string|JsExp $value
     * @return ButtonIcon
     */
    public function tooltip(string|JsExp $value): static
    {
        return $this->prop("tooltipContent", $value);
    }

    /**
     * @param string|JsExp $value
     * @return ButtonIcon
     */
    public function tooltipPlacement(string|JsExp $value = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end' | 'bottom-start' | 'bottom-end'): static
    {
        return $this->prop("tooltipPlacement", $value);
    }

    /**
     * @param int|JsExp $value
     * @return ButtonIcon
     */
    public function zIndex(int|JsExp $value): static
    {
        return $this->prop("zIndex", $value);
    }

    /**
     * @param int|string|JsExp $value
     * @return ButtonIcon
     */
    public function iconSize(int|string|JsExp $value): static
    {
        return $this->prop("iconSize", $value);
    }
}
